<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>geometry-utils - Documentation</title>

    <script src="scripts/prettify/prettify.js"></script>
    <script src="scripts/prettify/lang-css.js"></script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
</head>
<body>

<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
  <div class="navicon"></div>
</label>

<label for="nav-trigger" class="overlay"></label>

<nav>
    <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="LabelElement.html">LabelElement</a></li><li><a href="module-labeling-utils-GridPolygon.html">GridPolygon</a></li><li><a href="module-mgrs-utils-NonPolarGridZone.html">NonPolarGridZone</a><ul class='methods'><li data-type='method'><a href="module-mgrs-utils-NonPolarGridZone.html#toPolygon">toPolygon</a></li><li data-type='method'><a href="module-mgrs-utils-NonPolarGridZone.html#toPolyline">toPolyline</a></li></ul></li><li><a href="module-mgrs-utils-VisibleGridZone.html">VisibleGridZone</a><ul class='methods'><li data-type='method'><a href="module-mgrs-utils-VisibleGridZone.html#getCenterLabel">getCenterLabel</a></li><li data-type='method'><a href="module-mgrs-utils-VisibleGridZone.html#getLabels">getLabels</a></li></ul></li></ul><h3>Modules</h3><ul><li><a href="module-constants.html">constants</a></li><li><a href="module-geometry-utils.html">geometry-utils</a><ul class='methods'><li data-type='method'><a href="module-geometry-utils.html#~extentToPolygon">extentToPolygon</a></li><li data-type='method'><a href="module-geometry-utils.html#~pointToGeographic">pointToGeographic</a></li><li data-type='method'><a href="module-geometry-utils.html#~polygonToPolyline">polygonToPolyline</a></li><li data-type='method'><a href="module-geometry-utils.html#~toGeographic">toGeographic</a></li><li data-type='method'><a href="module-geometry-utils.html#~toWebMercator">toWebMercator</a></li></ul></li><li><a href="module-labeling-utils.html">labeling-utils</a><ul class='methods'><li data-type='method'><a href="module-labeling-utils.html#~distanceFromMapEdge">distanceFromMapEdge</a></li><li data-type='method'><a href="module-labeling-utils.html#~getScreenSize">getScreenSize</a></li><li data-type='method'><a href="module-labeling-utils.html#~getWidthOfText">getWidthOfText</a></li><li data-type='method'><a href="module-labeling-utils.html#~padZero">padZero</a></li><li data-type='method'><a href="module-labeling-utils.html#~screenDistanceBetweenPoints">screenDistanceBetweenPoints</a></li></ul></li><li><a href="module-mgrs-utils.html">mgrs-utils</a><ul class='methods'><li data-type='method'><a href="module-mgrs-utils.html#~getInterval">getInterval</a></li><li data-type='method'><a href="module-mgrs-utils.html#~handle100kGrids">handle100kGrids</a></li><li data-type='method'><a href="module-mgrs-utils.html#~handleIntervals">handleIntervals</a></li><li data-type='method'><a href="module-mgrs-utils.html#~handleZonePolygon">handleZonePolygon</a></li><li data-type='method'><a href="module-mgrs-utils.html#~processZonePolygons">processZonePolygons</a></li><li data-type='method'><a href="module-mgrs-utils.html#~zonesFromExtent">zonesFromExtent</a></li></ul></li></ul><h3>Externals</h3><ul><li><a href="external-Color.html">Color</a></li><li><a href="external-Extent.html">Extent</a></li><li><a href="external-Font.html">Font</a></li><li><a href="external-Geometry.html">Geometry</a></li><li><a href="external-Graphic.html">Graphic</a></li><li><a href="external-GraphicsLayer.html">GraphicsLayer</a></li><li><a href="external-Map.html">Map</a></li><li><a href="external-Point.html">Point</a></li><li><a href="external-Polygon.html">Polygon</a></li><li><a href="external-Polyline.html">Polyline</a></li><li><a href="external-SpatialReference.html">SpatialReference</a></li><li><a href="external-TextSymbol.html">TextSymbol</a></li></ul>
</nav>

<div id="main">
    
    <h1 class="page-title">geometry-utils</h1>
    

    




<section>

<header>
    
        
            
        
    
</header>

<article>
    <div class="container-overview">
    
        
            <div class="description"><p>Module containing geometry utilities used by GridOverlay widgets.</p></div>
        

        
            




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="lib_geometry-utils.js.html">lib/geometry-utils.js</a>, <a href="lib_geometry-utils.js.html#line6">line 6</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





























        
    
    </div>

    

    

    

     

    

    

    
        <h3 class="subsection-title">Methods</h3>

        
            

    

    <h4 class="name" id="~extentToPolygon"><span class="type-signature">(inner) </span>extentToPolygon<span class="signature">(extent)</span><span class="type-signature"> &rarr; {<a href="external-Polygon.html">external:Polygon</a>}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="lib_geometry-utils.js.html">lib/geometry-utils.js</a>, <a href="lib_geometry-utils.js.html#line141">line 141</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Converts an Extent geometry to a Polygon geometry (it does not modify the input point object)<br><strong>NOTE:</strong> Unlike the ArcGIS API for JavaScript's method (Polygon.fromExtent), this does not normalize the extent before converting to polygon</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>extent</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="external-Extent.html">external:Extent</a></span>


            
            </td>

            

            

            <td class="description last"><p>A geometry Extent object</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        
<div class="param-desc">
    <p>A geometry Polygon object</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="external-Polygon.html">external:Polygon</a></span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id="~pointToGeographic"><span class="type-signature">(inner) </span>pointToGeographic<span class="signature">(point)</span><span class="type-signature"> &rarr; {<a href="module-geometry-utils.html#~GeogprahicPoint">module:geometry-utils~GeogprahicPoint</a>}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="lib_geometry-utils.js.html">lib/geometry-utils.js</a>, <a href="lib_geometry-utils.js.html#line96">line 96</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Converts a geometry Point from WebMercator to Geographic and denotes the <em>x</em> offset from the range: 180°W =&gt; 180°E<br>NOTE: Does not modify the input point object</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>point</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="external-Point.html">external:Point</a></span>


            
            </td>

            

            

            <td class="description last"><p>A geometry Point object</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        
<div class="param-desc">
    <p>A geographic point object</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="module-geometry-utils.html#~GeogprahicPoint">module:geometry-utils~GeogprahicPoint</a></span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id="~polygonToPolyline"><span class="type-signature">(inner) </span>polygonToPolyline<span class="signature">(polygon)</span><span class="type-signature"> &rarr; {<a href="external-Polyline.html">external:Polyline</a>}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="lib_geometry-utils.js.html">lib/geometry-utils.js</a>, <a href="lib_geometry-utils.js.html#line160">line 160</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Converts an Polygon geometry to a Polyline geometry<br>NOTE: Does not modify the input polygon object</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>polygon</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="external-Polygon.html">external:Polygon</a></span>


            
            </td>

            

            

            <td class="description last"><p>A geometry Polygon object</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        
<div class="param-desc">
    <p>A geometry Polyline object</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="external-Polyline.html">external:Polyline</a></span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id="~toGeographic"><span class="type-signature">(inner) </span>toGeographic<span class="signature">(geometry)</span><span class="type-signature"> &rarr; {<a href="external-Geometry.html">external:Geometry</a>}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="lib_geometry-utils.js.html">lib/geometry-utils.js</a>, <a href="lib_geometry-utils.js.html#line33">line 33</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Converts any geometry from WebMercator to Geographic, or does nothing if it already is<br>NOTE: Does not modify the input geometry object</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>geometry</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="external-Geometry.html">external:Geometry</a></span>


            
            </td>

            

            

            <td class="description last"><p>An esri geometry object</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        
<div class="param-desc">
    <p>A geometry oject that is Geographic</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="external-Geometry.html">external:Geometry</a></span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id="~toWebMercator"><span class="type-signature">(inner) </span>toWebMercator<span class="signature">(geometry)</span><span class="type-signature"> &rarr; {<a href="external-Geometry.html">external:Geometry</a>}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="lib_geometry-utils.js.html">lib/geometry-utils.js</a>, <a href="lib_geometry-utils.js.html#line46">line 46</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Converts any geometry to WebMercator from Geographic, or does nothing if it already is<br>NOTE: Does not modify the input geometry object</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>geometry</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="external-Geometry.html">external:Geometry</a></span>


            
            </td>

            

            

            <td class="description last"><p>An esri geometry object</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        
<div class="param-desc">
    <p>A geometry oject that is WebMercator</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="external-Geometry.html">external:Geometry</a></span>


    </dd>
</dl>

    


        
    

    
        <h3 class="subsection-title">Type Definitions</h3>

        
                
<h4 class="name" id="~GeogprahicPoint">GeogprahicPoint</h4>





<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="lib_geometry-utils.js.html">lib/geometry-utils.js</a>, <a href="lib_geometry-utils.js.html#line82">line 82</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>



    <h5 class="subsection-title">Properties:</h5>

    

<table class="props">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>x</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last"><p>The longitude</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>y</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last"><p>The latitude</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>offsetX</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last"><p>The <em>x</em> offset</p></td>
        </tr>

    
    </tbody>
</table>






<div class="description">
    <p>A point-like geometry object, with x an y properties, and containing the non-normalized x-offset of the point</p>
</div>








            
    

    
</article>

</section>




</div>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
<script src="scripts/linenumber.js"></script>
</body>
</html>